1. Field of the Invention
This invention relates to an image processing apparatus for use in a printer, between a host computer and a printer and the like such as a printer controller, which inputs a vector image and outputs a raster image using a page description language (this is referred to as PDL language hereinafter). The invention particularly relates to improvement when density data determined by an anti-aliasing process are written to a memory as executing read-modify-write (this is referred to as RMW hereinafter) process in the image processing apparatus and achieves better printing image quality finally.
2. Discussion of Background
An anti-aliasing process is known as improving printing quality in a printer controller. FIG. 8 is a block diagram showing a conventional graphic accelerator (this is referred to as GA hereinafter), in which the block 801 is a GA and the block 205 is a frame memory. GA 801 is composed of a memory read/write control block and a look-up-table (this is referred to as LUT hereinafter) 302.
The operation of GA 801 will be described. GA 801 inputs contribution ratio which is defined as (image area in pixel area)/(pixel area), image density, a coordinate line y for raster scanning, a start coordinate xl and an end coordinate x2. Then it writes the data to the frame memory 205 on the basis of RMW process referring to LUT 302.
The operation of writing process to the memory including anti-aliasing process in a printer controller will be described using a flowchart of FIG. 9. The vector image is converted to the raster image according to control program (S 901). The raster conversion is that the image is divided into each coordinate line y, the contribution ratio of each pixel on the coordinate line y is decided (S 902). Then the pixel area of x coordinate which have the same contribution ratio and the same density is drawn. The drawing is as follows. The parameters of the coordinate line y for raster scanning, the start coordinate x1, and the end coordinate x2 of the area which has the same contribution ratio and the same density are inputted to the GA 801 (S 903). The GA 801 decides a final density by executing RMW process referring to the LUT 302 and writes the pixel data in memory address corresponded to the area between the start coordinate x1 and the end coordinate x2 on the coordinate line y (S 904). It is judged that this operation is executed for all pixel data or not. If this operation is not judged the end, it is repeated. If the operation is judged the end, it is finished.
FIG. 10 is a illustration indicating the anti-aliasing process. When the vector image is converted to the raster image as described above, the density of the edge portion of the image is decided by the contribution ratio, that is (image area in pixel area)/(pixel area). Therefore the density of the edge portion becomes weaker and a smooth image can be obtained visually. Then the density data is written to the frame memory 205 as executing the RMW process.
FIG. 11 is a illustration indicating the RMW process. For example, after the area 1 of the density 64 is drawn, the area 2 of the density 50 is drawn. In FIG. 11, the left edge portion of the area 2 overlaps the right edge portion of the area 1. The density which is already written in the frame memory 205 is 52, and the density and the contribution ratio which are overlaped are 50 and 0.2 respectively. So according to the RMW process, the final density is decided by the following EQU 51.2*(1-0.2)+50*0.2=50.96.
However, in the conventional image processing apparatus which executes the anti-aliasing as described above, some problems occur by the RMW process when the result of the anti-aliasing process is written to the frame memory.
The problems will be described in FIG. 12 and FIG. 13. As shown in FIG. 12 and FIG. 13, when there is a gradation image and the density of the image varies gradually, the following first problem occurs. That is, the density of the boundary pixel in which includes two edge portions of adjacent areas becomes weaker than each density of the right and the left pixels of the boundary pixel.
This first problem can be solved by the following. Before the density by the RMW process is written to the frame memory 205, the densities of the right and the left pixels are referred. If the density is between the density of the right pixel and that of the left one, writing to the frame memory 205 is executed. If not, the middle density value between the density of the right pixel and that of the left one is written. When this process is executed in FIG. 13, the result in FIG. 5 can be obtained. However, as the process is executed by software convetionally, the second problem, that is long processing time and is not efficient, occurs.